package com.ymatou.social.api.testcase;

import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.social.api.parameter.GetAttentionListBean;
import com.ymatou.social.api.service.GetAttentionListCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.business.service.AuthCallService;

/**
 * 关注首页接口 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_GetAttentionList {
	private static GetAttentionListBean attentionListBean;
	private static GetAttentionListCall attentionListCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("关注首页接口");
	}

	@Before
	public void caseUp() {
		attentionListBean = new GetAttentionListBean();

	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(attentionListCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetAttentionList_001() {
		Logger.start(true,"获取关注首页日记成功");
		try {
			attentionListBean.setUserId(1113);
			
			Map map2 =AuthCallService.authLogin("test007", "123456");
			String accessToken = (String) map2.get("AccessToken");
			attentionListCall = new GetAttentionListCall(accessToken);
			attentionListBean.setLimit(10);
			attentionListBean.setPageindex(1);
			// attentionListBean.setMaxtime(Maxtime);
			attentionListCall.setData(attentionListBean);
			attentionListCall.callService();
			Logger.comment("获取关注首页日记 call:" + attentionListCall.getEntityString());
			Logger.comment("获取关注首页日记 response:" + attentionListCall.getReturnData());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}